package cc.sheji.reposity;

import cc.sheji.domain.Order;
import cc.sheji.domain.PayLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface OrderRepository extends CrudRepository<Order, Long> , JpaSpecificationExecutor<Order> {

    @Query("select  sum(money)  from Order where state=1 ")
    long sumPrice();
}
